<template>
  <div class="work-record-header">
    <el-row style="paddingBottom: 0">
      <el-col :span="24">
        <!-- 搜索部分 -->
        <el-form :inline="true" :model="formInline" label-width="120px">
          <el-form-item label="拉力机名称">
            <el-input v-model="formInline.region" placeholder clearable />
          </el-form-item>
          <el-form-item label="工单号">
            <el-input v-model="formInline.region" placeholder clearable />
          </el-form-item>
          <el-form-item label="编带机名称">
            <el-input v-model="formInline.region" placeholder />
          </el-form-item>
          <el-form-item label="班次">
            <el-input v-model="formInline.region" placeholder />
          </el-form-item>
          <el-form-item label="测试结果">
            <el-select v-model="formInline.region" placeholder clearable>
              <el-option label="Pass" value="shanghai"/>
              <el-option label="Failed" value="beijing"/>
            </el-select>
          </el-form-item>
          <el-form-item v-show="!show">
            <el-button type="primary" icon="el-icon-search" >{{ $t('search') }}</el-button>
          </el-form-item>
          <el-form-item v-show="!show">
            <span class="el-dropdown-link" @click="show=!show">
              {{ $t('expand') }}
              <i class="el-icon-arrow-down el-icon--right"/>
            </span>
          </el-form-item>
        </el-form>
        <el-collapse-transition>
          <div v-show="show">
            <el-form :inline="true" :model="formInline" class="demo-form-inline">
              <el-form-item label="客户名称">
                <el-input v-model="formInline.region" placeholder />
              </el-form-item>
              <el-form-item label="操作员工号">
                <el-input v-model="formInline.region" placeholder />
              </el-form-item>
              <el-form-item label="角色">
                <el-select v-model="formInline.region" placeholder clearable>
                  <el-option label="生产" value="shanghai"/>
                  <el-option label="QC" value="beijing"/>
                </el-select>
              </el-form-item>
              <el-form-item label="测试时间">
                <el-date-picker
                  v-model="value"
                  :default-time="['00:00:00','23:59:59']"
                  type="datetimerange"
                  start-placeholder="测试时间"
                  end-placeholder="测试时间止"

                />
              </el-form-item>
              <el-form-item v-show="show">
                <el-button type="primary" icon="el-icon-search" >{{ $t('search') }}</el-button>
              </el-form-item>
              <el-form-item v-show="show">
                <span class="el-dropdown-link" @click="show=!show">
                  {{ $t('retract') }}
                  <i class="el-icon-arrow-up el-icon--right"/>
                </span>
              </el-form-item>
            </el-form>
          </div>
        </el-collapse-transition>
      </el-col>
    </el-row>
  </div>
</template>
<script>
export default {
  name: 'WorkRecordHeader',
  data() {
    return {
      show: false,
      formInline: {
        region: ''
      },
      value: ''
    }
  }
}
</script>
<style lang="scss" scoped>
@import "~@/assets/styles/defaultStyle.scss";
// .el-row {
//   min-height: 46px;
//   padding: 10px;
//   background-color: #fff;
// }
.el-dropdown-link {
  cursor: pointer;
  color: #409eff;
}
// .el-icon-arrow-down {
//   font-size: 12px;
// }
// .el-collapse-transition {
//   position: relative;
//   .el-date-picker {
//     position: absolute;
//     top: 50px;
//   }
// }
// .el-form-item {
//   margin-bottom: 0;
// }
</style>
